(define-abbrev-table 'global-abbrev-table '(
    ("rh"  "RedHat Linux" nil 1)
    ("hp"  "HP UX")
    ("teh" "the" nil 1)
    ("mh" "stuwsl15" nil 1)
    ("suse" "SuSE Linux" nil 1)
    ("suse8" "SuSE Linux Entprise 8" nil 1)
    ("win2k" "Windows 2000")
    ("sth"   "something")
    ("adts"  "ADE delivery test summary")
    ("ade"   "ADE")
    ("ods"   "ODS Toolbox")
    ("wiht"  "with")
    ("htr"   "How To Repeat")
    ("odsw"  "ODSTB Worktree")
    ("compw" "Components Worktree")
    ("chmop" "chomp")
    ))



;; (define-abbrev c++-mode-abbrev-table  ; abbrev table
;;   "for"                     ; name
;;   ""                        ; expansion
;;   '(lambda ()               ; expansion hook
;;      (snippet-insert 
;;       "for (int i = 0; i <$${max}; i++)\n{\n  $.\n}")))
;; (define-abbrev c++-mode-abbrev-table
;;   "if"
;;   ""
;;   '(lambda ()
;;      (snippet-insert
;;       "if ($${test} ) {\n  $.\n}")))

;; (define-abbrev c++-mode-abbrev-table
;;   "imain"
;;   ""
;;   '(lambda ()
;;      (snippet-insert
;;       "int main(int argc, char *argv[]){\n  $.\n}")))

;; (defun my-snippet-ruby ()
;;   (define-abbrev-table 'ruby-mode-abbrev-table '())
;;   (snippet-with-abbrev-table
;;    'ruby-mode-abbrev-table
;;    ("def"     .  "def $${test}\n$.\nend")))

;; (add-hook 'ruby-mode-hook 'my-snippet-ruby)




;;(load-file "~/lisppackage/snippet.el")

;; (snippet-with-abbrev-table python-mode-abbrev-table
;;   ("for" .  "for $${element} in $${sequence}:")
;;   ("im"  .  "import $$")
;;   ("if"  .  "if $${True}:")
;;   ("wh"  .  "while $${True}:"))




;; (defun my-snippet-cperl ()
;;   (define-abbrev-table 'cperl-mode-abbrev-table '())
;;   (snippet-with-abbrev-table
;;    'cperl-mode-abbrev-table
;; ;;    ("if"      .  "if ($${test}) {\n$.\n}")
;; ;;    ("for"     .  "for $$($${sequence}) {\n$.\n}")
;; ;;    ("foreach" .  "foreach $$($${sequence}) {\n$.\n}")
;; ;;    ("wh"      .  "while ($${test}) {\n$.\n}")
;; ;;    ("while"   .  "while ($${test}) {\n$.\n}")
;; ;;    ("do"      .  "do {\n$.\n} while($$);")
;;    ("map"     .  "map {\n$.\n}")
;;    ("grep"    .  "grep {\n$.\n}")
;;   ("open" .  "open $${fileHandle}, $${fileName} or die \"can not open file $${fileName}\";\n$.\nclose $${fileHandle};")
;;   ("sub"  .  "sub $${subname} {\n$.\n}")
;;   ("daf" . "my $dirname = $.\nopendir(DIR, $dirname) or die \"can't opendir $dirname: $!\";
;; while (defined($file = readdir(DIR))) {
;;     # do something with \"$dirname/$file\"
;; }
;; closedir(DIR);
;; ")))

;; (add-hook 'cperl-mode-hook 'abbrev-mode)
;; (add-hook 'cperl-mode-hook 'my-snippet-cperl)


;; (defun my-snippet-rhtml ()
;;   (interactive)
;;   (define-abbrev-table 'html-mode-abbrev-table '())
;;   (snippet-with-abbrev-table
;;    'html-mode-abbrev-table
;;    ("%%" . "<%= $. %>")
;;    ("%"  . "<% $. %>")))
;; (add-hook 'html-mode-hook 'my-snippet-rhtml)

 (provide 'tiw-abbrev)
